package com.anuyun.ms.base.config.property;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

/**
 * anuyun.feature.* 配置参数
 * set方法必须要规范 否则不生效:配置项auth的set方法为setAuth 参数名自定义
 * @author yufeng
 *
 */
@Configuration
@ConfigurationProperties(prefix="anuyun.feature")
public class FeatureProperty {
	
	
	/**
	 * 是否开启租户模式，默认开启
	 */
	public static boolean TENANT_MODE;	
	
	/**
	 * 是否开启登录认证，默认开启，可配置放行路径，不建议关闭
	 */
	public static boolean AUTH;
	
	/**
	 * 登录认证放行路径
	 */
	public static String AUTH_EXCLUDE_URL;
	
	
	@Value("${tenantMode:true}")
	public void setTenantMode(boolean tenantMode) {
		TENANT_MODE = tenantMode;
	}

	@Value("${auth:true}")
	public void setAuth(boolean auth) {
		AUTH = auth;
	}
	
	@Value("${authExcludeUrl:}")
	public void setAuthExcludeUrl(String path) {
		AUTH_EXCLUDE_URL = path;
	}









	
	
	
	
}
